<%@ page language="java" contentType="text/html; charset=UTF-8" session="true"
    pageEncoding="UTF-8"%>
<%@ page import="validaciones.IndexData"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>UNIDAD DE SALUD</title>
<link rel="shortcut icon" type="image/ico" href="images/sistema/u-salud-logo.ico" />
<link rel="stylesheet" href="lib/jquery1.7/themes/start/jquery-ui-1.8.17.custom.css" />
<link rel="stylesheet" href="css/demos.css" />
<link rel="stylesheet" href="css/pagina.css" />
<link rel="stylesheet" href="css/menuaco.css" />
<script type="text/javascript" src="lib/jquery1.7/jquery-1.7.1.js"></script>
<script type="text/javascript" src="lib/jquery1.7/external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.dialog.js"></script>
<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.mouse.js"></script>
<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.draggable.js"></script>
<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.position.js"></script>	
<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="lib/jquery1.7/ui/jquery.effects.core.js"></script>		
<script type="text/javascript" src="lib/jquery1.7/ui/jquery.effects.fade.js"></script>
<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.tabs.js"></script>
<script type="text/javascript" src="lib/menuaco.js"></script>
<%IndexData index=new IndexData();%>
<%
	HttpSession sesionx = request.getSession();
	if (sesionx.getAttribute("idusuario") == null) {
	%>
		<jsp:forward page="index.jsp"></jsp:forward>
	<%
	} 
%> 

<script type="text/javascript">
$(document).ready(function() {
	$.ajax({
	    url: "Inicio.jsp",
	    cache: false,
	    dataType: "html",
	    success: function(data) {
	    	$("#content").html('');
	    	$("#content").html(data);
	    }
	});
});
window.onfocus= function() {
	//sino esta en la web que le toca debe mandarlo a la inicial
	$.ajax({
			  url: "Sesion",
			  data:'pagina='+<%=index.aInicio%>, 
			  type: 'post',
			  dataType: 'json',
			  success: function(data){
		  			if(data.resultado==<%=IndexData.Redirigir%>){
		  				window.location=data.direccion;
				  	}
			  	}  
	});
}

$(function() {
	$("button").button();
	$("#tab-panel").tabs();
});

</script>
</head>
<body>	

<div id="header">
	<jsp:include page="contenido/gEncabezado.jsp"/>
</div>
<div id="leftcol">
	<jsp:include page="ContenidoMenu/Menu.jsp"/>
</div>


<div id="content">
</div>
<br>
<div id="footer" >
	<p>UDS INVENTARIO VERSION 1.0 Todos los derechos reservados</p>
</div>
</body>
</html>